package com.zja.service;

import com.zja.model.KnowledgeBase;

import java.util.List;

/**
 * @author JA
 * @date: 2025/5/3
 * description:
 */
public interface KnowledgeBaseService {
    List<KnowledgeBase> getAll();

    KnowledgeBase getById(Long id);

    boolean create(KnowledgeBase kb);

    boolean update(KnowledgeBase kb);

    boolean delete(Long id);

    List<KnowledgeBase> getByCreatorId(Long creatorId);

    boolean isAlreadyAdmin(Long kbId, Long userId);

    boolean addKnowledgeBaseAdmin(Long kbId, Long userId);
    //判断用户是否能管理知识库
    boolean userHasManagePermission(Long userId, Long kbId);

    public List<KnowledgeBase> getAllManagedKnowledgeBases(Long userId);
}
